let stream
function requestAudio() {
  navigator.mediaDevices.getUserMedia({ audio: true })
    .then((st) => {
      stream = st
      alert('权限获取成功')

    })
    .catch((err) => alert('权限获取失败' + err.message))
}
function releaseAudio() {
  if (!stream) {
    alert('stream has not initialized!!!')
    return;
  }
  stream.getTracks().forEach((track) => track.stop())
  confirm('权限已释放')
}